UserWidget instances should be destroyed when the actor is. That's
what consumer code expects since the destroy() method is never called.
https://bugzilla.gnome.org/show_bug.cgi?id=700807
this.actor = new St.BoxLayout({ style_class: 'user-widget',
vertical: false });
+ this.actor.connect('destroy', Lang.bind(this, this._onDestroy));
this._avatar = new UserMenu.UserAvatarWidget(user);
this.actor.add(this._avatar.actor,
this._updateUser();
},
- destroy: function() {
+ _onDestroy: function() {
if (this._userLoadedId != 0) {
this._user.disconnect(this._userLoadedId);
this._userLoadedId = 0;
this._user.disconnect(this._userChangedId);
this._userChangedId = 0;
}
-
- this.actor.destroy();
},
_updateUser: function() {